/**
 * 用户管理
 */

import request from '@/utils/request'

//查询用户信息
export function fetchList(query) {
  return request({
    url: '/user/list',
    method: 'get',
    params: query
  })
}

export function createUser(data) {
  return request({
    url: '/user/create',
    method: 'post',
    data
  })
}

export function readUser(data) {
  return request({
    url: '/user/detail',
    method: 'get',
    data
  })
}

export function updateUser(data) {
  return request({
    url: '/user/update',
    method: 'post',
    data
  })
}

export function listAddress(query) {
  return request({
    url: '/address/list',
    method: 'get',
    params: query
  })
}

export function listCollect(query) {
  return request({
    url: '/collect/list',
    method: 'get',
    params: query
  })
}

export function listFeedback(query) {
  return request({
    url: '/feedback/list',
    method: 'get',
    params: query
  })
}

//结束用户信息

//用户足迹
export function listFootprint (query) {
    return request({
      url: '/footprint/list',
      method: 'get',
      params: query
    })
  }

  //查找历史信息
  export function listHistory (query) {
    return request({
      url: '/history/list',
      method: 'get',
      params: query
    })
  }